// 封装头部
import React from 'react'
import { NavBar, Icon } from 'antd-mobile'
import { withRouter } from 'react-router-dom'
function Header(props) {
    let { title, back } = props
    return (
        <div>
            <NavBar
                mode="dark"
                icon={back ? <Icon type="left" /> : null}
                onLeftClick={() => props.history.go(-1)}
            >{title}</NavBar>
        </div>
    )
}
export default withRouter(Header)

